package ssm.xml.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import ssm.xml.pojo.Person;
import ssm.xml.service.PersonService;

import java.util.List;

@RestController
public class PersonController {

    @Autowired
    private PersonService personService;

    @GetMapping("listAll")
    public List<Person> listAll() {
        return personService.listAll();
    }
}